package edu.mju.canal;

import edu.mju.canal.client.CanalClient;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.annotation.Resource;

/**
 * @Author: wyp
 * @Date: 2020/11/15 22:54
 */
@SpringBootApplication
public class CanalApplication implements CommandLineRunner{

    @Resource
    private CanalClient canalClient;

    public static void main(String[] args) {
        SpringApplication.run(CanalApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        //客户端canal监听
        canalClient.run();
    }
}
